<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- Import style -->
    <link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css" />
    <!-- Import Vue 3 -->
    <script src="https://unpkg.com/vue@3"></script>
    <!-- Import component library -->
    <script src="https://unpkg.com/element-plus"></script>
</head>

<body>
    <div id="app">
        <el-row>
            <el-col :span="8"></el-col>
            <el-col :span="8">
                <h1>学习寄语</h1>
                <el-form :model="form">
                    <el-form-item label="姓名" >
                        <el-input v-model="form.name" />
                    </el-form-item>
                    <el-form-item label="年龄">
                        <el-input v-model="form.age" />
                    </el-form-item>
                    <el-form-item label="身高">
                        <el-input v-model="form.height" />
                    </el-form-item>


                    <el-form-item label=" 寄语" v-if="form.height>=180">
                        <el-alert title="兄弟呀，再有八块腹肌会更好！" type="success" />
                    </el-form-item>

                    <el-form-item label="寄语" v-else-if="form.height>=170">
                        <el-alert title="该用功学习了，不然没对象啦！" type="info" />
                    </el-form-item>

                    <el-form-item label="寄语" v-else-if="form.height>=160">
                        <el-alert title="兄弟呀，咱身高一般，但智商高" type="warning" />
                    </el-form-item>

                    <el-form-item label="寄语" v-else>
                        <el-alert title="别理他们，咱浓缩的都是精华！" type="error" />
                    </el-form-item>
                </el-form>
            </el-col>
            <el-col :span="8"></el-col>
        </el-row>
    </div>
</body>
<script>
    const App = {
        data() {
            return {
                form: {
                    name: "小明",
                    age: 18,
                    height: 180,
                }
            }
        },
        methods: {}
    }
    Vue.createApp(App).use(ElementPlus).mount("#app")
</script>

</html>